<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-broad-edit" th:object="${broad}">
        <input id="id" name="id" type="hidden" th:field="*{id}"/>
        <div class="form-group">
            <label class="col-sm-3 control-label">类型：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="ctype" id="ctype" th:field="*{ctype}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">存放编号：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="cid" id="cid" th:field="*{cid}"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">数据值：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="vdata" id="vdata" th:field="*{vdata}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">数据单位：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="vunit" id="vunit" th:field="*{vunit}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">采集状态：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="status" id="status" th:field="*{status}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">采集时间：</label>
            <div class="col-sm-8">
                <input class="form-control" type="date" name="colldate" id="colldate" th:field="*{colldate}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">采集网址：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="collip" id="collip" th:field="*{collip}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">安装时间：</label>
            <div class="col-sm-8">
                <input class="form-control" type="date" name="startdate" id="startdate" th:field="*{startdate}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">更换时间：</label>
            <div class="col-sm-8">
                <input class="form-control" type="date" name="exdate" id="exdate" th:field="*{exdate}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">存放位置编号：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="deptid" id="deptid" th:field="*{deptid}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="demo" id="demo" th:field="*{demo}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">是否有效：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="delflag" id="delflag" th:field="*{delflag}">
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "iot/broad";

    $("#form-broad-edit").validate({
        rules:{
            xxxx:{
                required:true,
            },
        }
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-broad-edit').serialize());
        }
    }
</script>
</body>
</html>
